#include <stdio.h>
#include <stdlib.h>

int main()
{
    int n;
    scanf("%d", &n);

    int *dis = (int *)malloc(sizeof(int) * 10);
    int count = 0;

    for (int b = 0; b < n / 2; b++)
    {
        for (int a = b + 1; a < n / 2; a++)
        {
            int res = a * a - b * b;
            if (1 <= res && res <= 10)
            {
                int found = 0;
                for (int i = 0; i < count; i++)
                {
                    if (dis[i] == res)
                    {
                        found = 1;
                        break;
                    }
                }
                if (!found)
                {
                    dis[count++] = res;
                }
            }
        }
    }

    printf("%d\n", count);

    free(dis);
    return 0;
}
